/*
 * Copyright (C) 2010 Seapeak.Xu
 *
 * fostmq may be copied only under the terms of the GNU General
 * Public License V3, which may be found in the fostmq source kit.
 *
 * Created on: 2010-7-28
 * Author: Seapeak.Xu
 */

#ifndef FOST_STRING_H_
#define FOST_STRING_H_
#ifdef __cplusplus
extern "C"
{
#endif

#include <stdlib.h>
#include <stdio.h>
/*
 * trim the left space of the value
 * args:
 * 	value : the old string
 * return:
 * 	the pointer to the trim string
 */
char *ltrim(char *value);

/*
 * trim the right space of the value
 * args:
 * 	value : the old string
 * return:
 * 	the pointer to the trim string
 */
char *rtrim(char *value);

/*
 * trim the space
 * args:
 * 	value : the old string
 * return:
 * 	the pointer to the trim string
 */
char *trim(char *value);

char *bin2hex(const char *bin_buff, const int len, char *buff);

#ifdef __cplusplus
}
#endif
#endif /* STRINGLIB_H_ */
